﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<z.m.db.OrderDetail>" %>
<% if(ViewData["title"] !=null){ %>
<thead>
    <tr>
        <td><%:Html.LabelFor(m =>m.ID) %></td>
        <td><%:Html.LabelFor(m =>m.Order) %></td>
        <td><%:Html.LabelFor(m =>m.Order_ID) %></td>
        <td><%:Html.LabelFor(m =>m.Product)%></td>
        <td><%:Html.LabelFor(m =>m.Product_ID) %></td>
        <td><%:Html.LabelFor(m =>m.Quantity) %></td>
        <td><%:Html.LabelFor(m =>m.Unit_Price) %></td>
    </tr>
</thead>
<%} else {
 using (Html.BeginForm("_Adminster", "OrderDetail", FormMethod.Post, new {id = "FormOrderDetail"+ Model.ID})){ %>
<tr>
    <td><%:Html.TextBoxFor(m => m.ID, new {@ReadOnly = true })%></td>
    <td><%:Html.TextBoxFor(m =>m.Order) %></td>
    <td><%:Html.TextBoxFor(m=>m.Order_ID) %></td>
    <td><%:Html.TextBoxFor(m =>m.Product) %></td>
    <td><%:Html.TextBoxFor(m=>m.Product_ID) %></td>
    <td><%:Html.TextBoxFor(m =>m.Quantity) %></td>
    <td><%:Html.TextBoxFor(m=>m.Unit_Price) %></td>
    <td>
        <input type="button" value="save" onclick ="ajaxTrSubmit('FormUser <%:Model.ID %>')" />
    </td>
</tr>
<%}
    }%>
